package ics.nodes.event;

import ics.DateParentNode;
import ics.nodes.Constants;

import java.time.Instant;
import java.util.Date;

public class DTEnd extends DateParentNode {

    @Deprecated
    public DTEnd(Date date) {
        super(Instant.ofEpochMilli(date.getTime()));
        setName(Constants.DTEND);
    }

    public DTEnd(Instant instant) {
        super(instant);
        setName(Constants.DTEND);
    }

    @Override
    public String toString() {
        return getName() + ";" + Constants.TZID + "=" + getZoneId().getId() + ":" + getValue();
    }

}
